package course.mystream;


import java.util.ArrayList;

public class MyStream3 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("张三");
        list.add("李四");
        list.add("王五");
        list.add("张无忌");
        list.add("张翠山");
        list.add("张良");

        list.stream().filter(s -> s.startsWith("张")).forEach(s-> System.out.println(s));
    }
}
